python track allocated memory